package com.belinked_client.apllication;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Rect;

public class static_values {
	
	 public static final String SERVERIP = "192.168.2.1";
	//public static final String SERVERIP = "192.168.137.1";
	 public static final int SERVERPORT_Chat = 54322;
	 //svn
	 // private static final String httpUrl =
	 //"http://10.0.2.2:8080/reg/src/index.jsp";
	 //private static final String httpUrl = "http://10.0.2.2/belinked_reg/index.php";
	 public static final String httpUrl = "http://192.168.2.1/belinked_reg/index.php";
	 public static final String uploadUrl = "http://192.168.2.1/belinked_reg/uploadImg.php";
	 public static final String downloadUrl = "http://192.168.2.1/belinked_reg/user_img/";
	 public final static int show_room_chat_message_Notiication = 0xdd11; 
	 public final static int showfriend_invite_Notification = 0xdd12;
	 public final static int chat_main = 0xfff111;
	 public final static int new_room = 200;
	 public final static int search_room= 201;
	 public final static int room_chat =202;
	 public final static int friend_chat = 203;
	 public final static int  friend_manager = 204;
	 public final static int login = 205;
	 public final static int client_chat_main = 206;
	 public final static int join_room = 207;
	 public final static int flash_data = 208;
	 public final static int WAIT_TIME = 5000;
	 public final static int PAGE_SIZE = 20;
	 
	 public static Bitmap set_bitmap(Bitmap sourceBitmap,int targetWidth ,int targetHeight){
		 
		 Bitmap targetBitmap = Bitmap.createBitmap(

		 targetWidth,

		 targetHeight,

		 Bitmap.Config.ARGB_8888);

		 Canvas canvas = new Canvas(targetBitmap);

		 Path path = new Path();

		 path.addCircle(

		 ((float)targetWidth - 1) / 2,

		 ((float)targetHeight - 1) / 2,

		 (Math.min(((float)targetWidth), ((float)targetHeight)) / 2),

		 Path.Direction.CCW);

		 canvas.clipPath(path);
		 
		 canvas.drawBitmap(sourceBitmap,
				 
		 new Rect(0, 0, sourceBitmap.getWidth(), sourceBitmap.getHeight()),

		 new Rect(0, 0, targetWidth, targetHeight),

		 null);

		return targetBitmap;
	 }
}
